package com.zhiying.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import com.zhiying.domain.CMS_Menu;
import com.zhiying.domain.CMS_Organization;
import com.zhiying.domain.CMS_User;
import com.zhiying.domain.Role;
import com.zhiying.domain.UserLoginLog;
import com.zhiying.page.BasePageDTO;
import com.zhiying.page.PageInfo;
import com.zhiying.page.UserPageDTO;

public interface MenuService  {
	//查询主菜单信息
	List<CMS_Menu> SelectMenuOneLIst();
	List<CMS_Menu> SelectMenusubmenuList();
	//查询管理列表信息
	UserPageDTO selectByPage(PageInfo pageInfo, String search);

	CMS_User selectRole();

	int deleteUserByUserId(@Param("id")Long userId);
	//根据用户id删除用户信息
	CMS_User selectUserById(@Param("id")Long id);
	//根据用户id查询用户信息
	List<Role> selectRoleList(@Param("status")Integer status );
	//根据用户状态查询信息
	List<Role> listByUserId( @Param("status")Integer status,@Param("userId") Long userId );
	//查询用户角色信息
	List<CMS_Organization>  listBySataus(@Param("status")Integer status);
	//查询用户部门信息
	int updateUserById(CMS_User cms_user,String[]values,int org_id);
	//根据用户id修改用户信息
	int deleteUserRole(@Param("id") int id);
	//根据角色id删除角色信息
	int updateStatus(@Param("cms_user")CMS_User cms_user);
	//根据用户id修改用户状态
	BasePageDTO<UserLoginLog> listByPage(@Param("userId") Long userId, @Param("pageInfo") PageInfo pageInfo,
			@Param("search") String search);
	//查询用过户登陆信息
	int selectCMSUserCount(String search);
	//查询用户个数    
	int selectCMSUserLoginLog(@Param("userId")int userId,@Param("search")String search);
	//查询用户的登陆日志的个数
	int insertLoginLog(@Param("userLoginLog")UserLoginLog userLoginLog);
	//插入登陆日志
	int insertNewUser(@Param("cmsUser")CMS_User cmsUser,@Param("organizationId")int organizationId,String[]role);
	//新增用户
	int updateUserPasswordById(@Param("password")String password,@Param("userId") int userId);
    //修改密码
	String selectUserByPassword(@Param("nowpassword")String nowpassword);
	//查询原密码是否存在
	int updateInfos(@Param("password")String password,@Param("nowpassword")String nowpassword);
    //修改个人信息
	int updateAdminInfoByUserId(@Param("cmsuser")CMS_User cmsuser);
}
